package com.wj.proxy;

import com.wj.proxy.people.JiaSi;
import com.wj.proxy.people.WangPo;

/**
 * 2.代理模式
 * @author WangJin
 * @version 1.0
 * @date 2022/2/11 12:08
 */
public class XiMenQing {
    public static void main(String[] args) {
        //把王婆叫出来
        WangPo wangPo = new WangPo();
        JiaSi jiaSi = new JiaSi();
        WangPo wangPo1 = new WangPo(jiaSi);
        //然后西门庆就说，我要和潘金莲happy，然后王婆就安排了西门庆丢筷子的那出戏:
        wangPo.makeEyesWithMan(); //看到没，虽然表面上时王婆在做，实际上爽的是潘金莲
        wangPo.playWithMan();

        wangPo1.makeEyesWithMan(); //贾四和男人抛媚眼
        wangPo1.playWithMan();  //贾四和男人做爱

    }
}
